﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace l1cs.server.templates
{
    public class L1Weapon : L1Item
    {
        public L1Weapon()
        {
        }

        private int _range = 0; // ● 射程範囲

        override
        public int getRange()
        {
            return _range;
        }

        public void setRange( int i )
        {
            _range = i;
        }

        private int _hitModifier = 0; // ● 命中率補正

        override
        public int getHitModifier()
        {
            return _hitModifier;
        }

        public void setHitModifier( int i )
        {
            _hitModifier = i;
        }

        private int _dmgModifier = 0; // ● ダメージ補正

        override
        public int getDmgModifier()
        {
            return _dmgModifier;
        }

        public void setDmgModifier( int i )
        {
            _dmgModifier = i;
        }

        private int _doubleDmgChance; // ● DB、クロウの発動確率

        override
        public int getDoubleDmgChance()
        {
            return _doubleDmgChance;
        }

        public void setDoubleDmgChance( int i )
        {
            _doubleDmgChance = i;
        }

        private int _magicDmgModifier = 0; // ● 攻撃魔法のダメージ補正

        override
        public int getMagicDmgModifier()
        {
            return _magicDmgModifier;
        }

        public void setMagicDmgModifier( int i )
        {
            _magicDmgModifier = i;
        }

        private int _canbedmg = 0; // ● 損傷の有無

        override
        public int get_canbedmg()
        {
            return _canbedmg;
        }

        public void set_canbedmg( int i )
        {
            _canbedmg = i;
        }

        override
        public bool isTwohandedWeapon()
        {
            int weapon_type = getType();

            bool ret = ( weapon_type == 3 || weapon_type == 4
                    || weapon_type == 5 || weapon_type == 11
                    || weapon_type == 12 || weapon_type == 15
                    || weapon_type == 16 || weapon_type == 18 );

            return ret;
        }
    }
}
